﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Properties;
using System.Data;
using IngressApp.DAC;

namespace IngressApp.BC
{
    public class BCInsert
    {
      
        public string insert(Empleado obj)
        {
            

            DACInsert ins = new DACInsert();
            ins.insertRecord(obj);

            DACRead read = new DACRead();
            String vacio = "APgdAcgq43NcwEE3CatxcI0UVZIQGQoezNA/t6AhdJMfvb/g5bu5rC32fwAiCAi9N5VcfkGSqlhVWEwY0wbFxZm0zh2dcmZb7iy99dIlU32wAO7gzTbrCOd4uGzH6d6+kqWrWnwgP9Ulp9jxEdZLH1xrrZ1PneQ86mY1Zd8m9Mf1OH7shcOjdqt1fe8y50q/Thqine4YegNDx0bG+rgmOso71U0zeJiK43/DVSNyjffU7S3yCzFYp/yKFutANxxjXsWXIXihKzRMWo3lvLYHerv3ZurcimK4kDvAVJ0LzQsMJII/j+rLGjdQFVRcGMTfV99Ac+6AzDFv4NsgH9Bct/iE0CkBHygw4kiPwoGnj/5sxPc795C2dKjNtMm8qT1ZGm8A+DgByCrjc1zAQTcJq3Ew/hRVksU0uU4AXz94F/+btUEJQL/k9Mv0xd5+BY7IiqBg/+7LPW2A8cfsyXtJqVoSXYp42pimCWy4KFQp4E4BE5B1Faz9uKG17uzXhGR9k9QPmEyKAVCXW4Pp5f/2wXxT/lb2B6XoNDUz91RCIpfFesGg0zmSZVP+NUbeZ6wQX9TxzYt/mxRJMD2fcXP7wLxslm06qJrl0rsDo1H1kZQB/39CnmhEs6Nkp4RqrkKQRVFl+JItrSvxCnXc58ZoZi2BvYbTzFBCqyx4cTJCVvQtZbiioGkV+Qm6Vv/p6XGInGjDrek5TL5Z26oGOQveyZ4UQdVWxa06OfDbdtbKtK9yVmVmEtHlFj17Ne9D3TRQ/cqu1Cam/z/9eXWYFuU2r9gVPhHjecbMIFD9gqWVbwD4gQHIKuNzXMBBNwmrcbDxFFWS5+MMmYFyO6wxvBUOroUeilELUEQCqEz+WYSUcCWVOnZ6P37Nx4sKkYOkyj2LYc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AAAAAAAAAAAAAAAEOtOBf////8AAAAAEOtOBQiJOgCwJBYAWgAABgAAAAAAAAAAAAAAABDrTgX/////AAAAABDrTgUsiToAsCQWAFsAAAYAAAAAAAAAAAAAAAAQ604F/////wAAAAAQ604FUIk6ALAkFgBcAAAGAAAAAAAAAAAAAAAAEOtOBf////8AAAAA";
           

            EmpleadoHuella objHuella = new EmpleadoHuella();
            
            
            objHuella.IdEmpleado = Convert.ToInt32(read.readEmpleadoUltimo().Rows[0].ItemArray[0]);
            objHuella.TipoHuella = 2;
            objHuella.Huella = vacio;

            if (ins.insertRecord(objHuella) ==true)
                return "succes";
            else
                return "failed";

        }
        public string insert(EmpleadoHuella obj)
        {
            
            DACInsert ins = new DACInsert();
            if (ins.insertRecord(obj) == true)
                return "succes";
            else
                return "failed";
        }
        public string insert(TipoHuella obj)
        {
            DACInsert ins = new DACInsert();
            if (ins.insertRecord(obj) == true)
                return "succes";
            else
                return "failed";
        }
        public string insert(Registro obj)
        {
            DACInsert ins = new DACInsert();
            if (ins.insertRecord(obj) == true)
                return "succes";
            else
                return "failed";
        }

    }
}
